import request from '@/utils/request'
/******************************组合模板*******************************/
/**下拉查询模板（不分页） */
export function listNoPage(params) {
  return request({
    url: '/distribution/distrCombTemplate/listNoPage',
    params
  })
}
/** 新增/修改组合模板 */
export function insertUpdateDistrCombTemplate(data) {
  return request({
    url: '/distribution/distrCombTemplate/insertUpdateDistrCombTemplate',
    method: 'post',
    data
  })
}

/**删除组合模板 */
export function remove(id) {
  return request({
    url: `/distribution/distrCombTemplate/delete/${id}`,
    method: 'delete',
  })
}


/**根据skuid查询模板历史申请记录-组合 */
export function getComApplyNumBySkuId(params) {
  return request({
    url: '/distribution/skuTempProxyApply/getComApplyNumBySkuId',
    params
  })
}



/**新增商品SKU代做模板申请-组合 */
export function addCom(data) {
  return request({
    url: '/distribution/skuTempProxyApply/addCom',
    method: 'POST',
    data
  })
}

/******************************组合模板end*******************************/


/**导入卖家SKU组合 */
export function importSellerCombination(data) {
  return request({
    url: '/distribution/skuShop/importSellerCombination',
    method: 'post',
    data
  })
}

export function getDistributorShopCombinationList(params) {
  return request({
    url: '/distribution/distributorShopCombination/getDistributorShopCombinationList',
    method: 'get',
    params
  })
}


/**新增店铺SKU组合 */
export function insertDistributorShopCombination(data) {
  return request({
    url: '/distribution/distributorShopCombination/insertDistributorShopCombination',
    method: 'post',
    data
  })
}




/**修改店铺SKU组合 */
export function updatesDistributorShopCombination(data) {
  return request({
    url: '/distribution/distributorShopCombination/updatesDistributorShopCombination',
    method: 'post',
    data
  })
}


/**删除店铺SKU组合 */
export function deleteDistributorShopCombination(id) {
  return request({
    url: '/distribution/distributorShopCombination/deleteDistributorShopCombination/' + id,
    method: 'DELETE',
  })
}



/**查询SKU列表 */
export function getCombinationSkuListById(params) {
  return request({
    url: '/distribution/distributorShopCombination/getCombinationSkuListById',
    params
  })
}

/**组合追加SKU */
export function bindCombinationSku(data) {
  return request({
    url: '/distribution/distributorShopCombination/bindCombinationSku',
    method: 'post',
    data
  })
}


/**删除组合里面的SKU */
export function deleteDistributorShopCombinationSku(id) {
  return request({
    url: '/distribution/distributorShopCombination/deleteDistributorShopCombinationSku/' + id,
    method: 'DELETE',
  })
}



/**修改组合sku数量 */
export function updateCombinationSkuNum(data) {
  return request({
    url: '/distribution/distributorShopCombination/updateCombinationSkuNum',
    method: 'post',
    data
  })
}
// 云池不可见sku分组查询所有分组列表
export function getCloudGroup(params) {
  return request({
    url: '/distribution/skuCloudGroup/getCloudGroup',
    method: 'get',
    params
  })
}
/**云池不可见sku列表设置分组 */
export function setSkuCloudGroup(data) {
  return request({
    url: '/distribution/skuCloudGroup/setSkuCloudGroup',
    method: 'post',
    data
  })
}
// 查询分组关联卖家列表
export function getCloudGroupSellerListIs(params) {
  return request({
    url: '/distribution/cloudGroup/getCloudGroupSellerListIs',
    method: 'get',
    params
  })
}

// 查询分组关联卖家列表
export function getCloudGroupSellerListNot(params) {
  return request({
    url: '/distribution/cloudGroup/getCloudGroupSellerListNot',
    method: 'get',
    params
  })
}

/**设置分组租户to已选择卖家 */
export function setSkuCloudGroupSeller(data) {
  return request({
    url: '/distribution/skuCloudGroup/setSkuCloudGroupSeller',
    method: 'post',
    data
  })
}

/**移除分组租户to已选择卖家 */
export function removeSkuCloudGroupSeller(data) {
  return request({
    url: '/distribution/skuCloudGroup/removeSkuCloudGroupSeller',
    method: 'post',
    data
  })
}